<template>
	<div class="app-container">
		<!-- <Admin></Admin> -->
		<div v-if='dom'>
			<admin></admin>
		</div>
		<div v-else>
			<stduent></stduent>
		</div>
	</div>
</template>
<script setup name="copy">
import stduent from './student.vue';
import admin from "./admin.vue"
import {onMounted,ref} from "vue"
import { GlobalStore } from "@/stores";
const globalStore = GlobalStore();
const dom = ref();
const getType = ()=>{
	let type = globalStore.userInfo.type;
	if(type === 'admin'){
		dom.value = 1
	}else{
		dom.value = 0;
	}
}
onMounted(()=>{
	getType()
	// console.log(globalStore.userInfo.type)
})
</script>
<style scoped lang="scss">

</style>
